 <link rel="stylesheet" href="/js/jwysiwyg/jquery.wysiwyg.css" type="text/css" />
  <script type="text/javascript" src="/js/jwysiwyg/jquery.wysiwyg.js"></script>
  <script type="text/javascript">
  $(function()
  {
      $('#wysiwyg').wysiwyg();
  });
  </script>
		<div id="sf_guard_auth_form">
		<?php echo form_tag('idol/editnews', array(
			  'id'        => 'sf_admin_edit_form',
			  'name'      => 'sf_admin_edit_form',
			  'multipart' => true,
			)) ?>
			<?php echo input_hidden_tag('idolnews[id]', $news_item['Id'],array('id'=>'id'));?>  			
		    <div class="clear lg_row">
		    
		    	<div class="lg_row_left">
		      		<?php echo label_for('idolnews[title]', __('Tiêu đề', null, 'news'));?>
		      	</div>
		      	<div class="lg_row_right">
		      		<?php echo input_tag('idolnews[title]', $news_item['Title'],array('id'=>'title'));?>
		      	</div>
		    </div>
		    <div class="clear lg_row">
		  		
		  	</div>
		  		<div class="clear lg_row">
		    	<div class="lg_row_left">
		      		<?php echo label_for('idolnews[quote]', __('Tóm tắt', null, 'news'));?>
		      	</div>
		      	<div class="lg_row_right">
		      		<?php echo textarea_tag('idolnews[quote]', $news_item['Quote'], array('size'=>'150x5','id'=>'quote')) ?>
		      	</div>
		    </div>
		  	<div class="clear lg_row">
		    	<div class="lg_row_left">
		      		<?php echo label_for('idolnews[content]', __('Nội dung', null, 'news'));?>
		      	</div>
		      	<div class="lg_row_right">
		      		<?php echo textarea_tag('idolnews[content]', $news_item['Content'], array('size'=>'150x20','id'=>'wysiwyg')) ?>
		      	</div>
		    </div><br>
		    <div class="clear lg_row">
		        <label for="filters_created_datetime"><?php echo __('Ngày tạo:') ?></label>
			    <div class="content">
			  
			  		  <?php 
			  		  echo input_date_tag('idolnews[create_datetime]',$news_item['CreateDatetime'],array (
					  'rich' => true,
			  		  'id' => 'createdate',
					  'withtime' => true,
					  'calendar_button_img' => '/sf/sf_admin/images/date.png',)) ?>
			    </div>
			</div>
		    <div class="clear lg_row">
		    <?php
		    	if($news_item['Enable'] || !$news_item['Id'] )
		    	{
		    		$checked_enb = 'checked="checked"';
		    	}
		    	if($news_item['ContestRules'])
		    	{
		    		$checked_cont = 'checked="checked"';
		    	}
		    ?>
		     <input type="checkbox" style="width:50px;" name="idolnews[contest_rule]" value="1"<?php echo $checked_cont ?> id="contest_rule" />
		    	<?php echo label_for('idolnews[contest_rule]', 'Thể lệ cuộc thi', '') ?>
		    </div>
		    <div class="clear lg_row">
		     <input type="checkbox" style="width:50px;" name="idolnews[enable]"<?php echo $checked_enb ?>  value="1" id="enable" />
		    	<?php echo label_for('idolnews[contest_rule]', 'Hiển thị', '') ?>
		    </div>
		   
		   
		
		
		  <div style="width: 100%;clear:both;"><?php include_partial('edit_actions');?></div>
		  
	</form>
	</div>
	 <?php if($news_item['Id']):?>
	<ul class="sf_admin_actions">
      <li class="float-left">
   
	<?php echo button_to(__('delete'), 'idol/editnews/?idolnews[act]=delete&idolnews[id]='.$news_item['Id'], array (
	  'post' => true,
	
	  'confirm' => __('Are you sure?'),
	  'class' => 'sf_admin_action_delete',
	)) ?>
	</li>
	  </ul>
<?php endif;?>
